<template>
  <div>
    <h4>状态</h4>
    <pl-button
      v-for="item in ['primary', 'success', 'warn', 'error', 'info']"
      :key="item"
      :status="item"
      style="margin-right: 10px"
      @click="click"
      >按钮</pl-button
    >
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
  setup() {
    return {
      click() {
        // 点一次按钮会执行两次，因为内部还emit了一次click事件
        console.log('点击了按钮');
      },
    };
  },
});
</script>

<style lang="scss"></style>
